<template>
	<view class="music-panel">
		<button @click="openPopup">选择文件</button>
		
		<FileSelectModePopup @change="modeChange" ref="popupRef"></FileSelectModePopup>
	</view>
</template>

<script lang="ts" setup>
import FileSelectModePopup from '../FileSelectModePopup/FileSelectModePopup.vue';
import type { ChooseType } from '../FileSelectModePopup/FileSelectModePopup.vue';

import { ref } from "vue";
const popupRef = ref(null);
const allowedChooseTypes: Array<ChooseType> = ["wxchat"];

function openPopup() {
	popupRef.value && (popupRef.value as any).open();
}

function modeChange(type: ChooseType) {
	console.log(type);
}
</script>

<style lang="scss" scoped>

</style>